/**
   A class to convert degree, minute, seconds to decimal degrees
*/
public class Degrees
{
   /**
      Converts minutes and seconds to decimal degrees 
      @param degrees the degrees between -359 and 359
      @param minutes the minutes between 0 and 59
      @param seconds the minutes between 0 and 59
      @return the equivalent decimal degrees between -360 and 360 (exclusive)
   */
   public double decimalDegrees(int degrees, int minutes, int seconds)
   {
      return degrees+Math.signum(degrees)*minutes/60.0+Math.signum(degrees)*seconds/60.0/60.0;
   }
}